using System;
using System.Collections.Generic;
using System.Text;

namespace RapidHDL
{
    class Nor : TruthTableComponent 
    {
        public NodeVector InputNodes;
        public NodeVector OutputNodes;

        public Nor(Component poParentComponent, string psName)
            : base(poParentComponent, psName)
        {
            this.GetTruthTable("Nor", 2, 1);
            InputNodes = this.CreateNodeVector("Input", 2, NodeFlowType.Sink);
            OutputNodes = this.CreateNodeVector("Output", 1, NodeFlowType.Source);
        }

        protected override void GenerateTruthTable()
        {
            this.TruthTable.AddTableEntry("00", "1");
            this.TruthTable.AddTableEntry("01", "0");
            this.TruthTable.AddTableEntry("10", "0");
            this.TruthTable.AddTableEntry("11", "0");
        }

        public override bool TransformStructureToVerilog()
        {
            WriteVerilogLookupTable();
            return true;
        }
    }
}
